from pydantic import BaseModel, Field
from typing import Optional, List


class UploadParams(BaseModel):
    image: str = Field('image', description='image data', sqlalchemy_safe=True)
    timestamp: Optional[int] = Field(None, description="时间戳", sqlalchemy_safe=True)


class SearchParams(BaseModel):
    image: str = Field('image', description='image data', sqlalchemy_safe=True)
    topk: int = 3
    start_time: Optional[int] = Field(None, description="查询的起始时间戳", sqlalchemy_safe=True)
    end_time: Optional[int] = Field(None, description="查询的结束时间戳", sqlalchemy_safe=True)
